package com.laoliu.example.generate.web;

import com.laoliu.example.generate.bean.vo.GenerateParamVO;
import com.laoliu.example.generate.core.itf.GenerateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/example/cdGen/")
@Api(tags = "代码生成类")
public class GenerateController {

    @Autowired
    GenerateService generateService;

    @PostMapping("generate")
    @ApiOperation(value="生成代码")
    public String generate(@RequestBody GenerateParamVO paramVO) {
        generateService.generate(paramVO);
        return "生成成功";
    }
}
